/*
 * Copyright (c) 2009.
 */

package kz.home.gui;

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Font;

/**
 * @author: danik
 * Date: 04.08.2009
 * Time: 1:32:54
 */
public class PresentForm extends Canvas {

    public PresentForm() {

    }

    protected void paint(Graphics g) {
        // Clear the background (to white)
        g.setColor(255, 255, 255);
        g.fillRect(0, 0, getWidth(), getHeight());

        // Set color and draw text Draw with black pen
        g.setColor(0, 0, 0);
        // Center the text
        g.setFont(Font.getFont(Font.FACE_MONOSPACE,Font.STYLE_BOLD,Font.SIZE_LARGE));

        System.out.println("width[" + getWidth() + "] height[" + getHeight() + "]");
        g.drawString("Расписание Кинотеатров", getWidth()/2, getHeight()/2, Graphics.TOP | Graphics.HCENTER);

        g.setColor(200, 0, 0);
        g.setFont(Font.getFont(Font.FACE_MONOSPACE,Font.STYLE_PLAIN,Font.SIZE_MEDIUM));
        g.drawString("v 0.1 beta", getWidth() / 2 , (getHeight()/2) + g.getFont().getHeight() , Graphics.TOP | Graphics.HCENTER);
    }
}
